<?php    
    /**
     * 0    = General validation exception
     * 1    = Unknown key
     * 10   = Value can't be null
     * 20   = Invalid datatype
     * 30   = Value is invalid (RegExp mismatch)
     * 40   = Value is larger than allowed maximum value
     * 50   = Value is smaller than required minimum value
     * 60   = Value is longer than allowed maximum length
     * 70   = Value is shorter than required minumum length
     * 80   = Value is not in allowed range (enum)
     * 90   = Invalid email
     * ***
     * 1000...x = Class specific errors
     *
     * UserModel - class
     * 1000 = Email already exists
     * 1001 = Password must have at least six characters
     * 1001 = Password do not match the confirm password
     *
     * WorkoutExerciseSetModel - class
     * 2000 = Only barbell exercises can have barbell type
     *
     * TemplateExerciseSetModel - class
     * 3000 = Only barbell exercises can have barbell type
     */    
    class ValidationException extends BaseException {        
        public function __construct($message,$code = 0,$class = null,
                $key = null,$value = null,Exception $previous = null) {
            $this->_data["key"]     = $key;
            $this->_data["value"]   = $value;
            parent::__construct($message,$code,$class,$previous);
        }
    }